//
//  FKCommodityServiceCell.m
//  BaiYeMallShop
//
//  Created by Macbook Pro on 2018/11/6.
//  Copyright © 2018年 Macbook Pro. All rights reserved.
//

#import "FKCommodityServiceCell.h"

@interface FKCommodityServiceCell ()

@property (nonatomic, weak) UILabel *nameLabel;
@property (nonatomic, weak) UILabel *valueLabel;

@end

@implementation FKCommodityServiceCell

- (void)setupSubviews
{
    [super setupSubviews];
    
    UILabel *nameLabel = [UILabel fk_labelWithFont:fk_adjustFont(14) textColor:fkColor333333];
    [self.contentView addSubview:nameLabel];
    self.nameLabel = nameLabel;
    
    UILabel *valueLabel = [UILabel fk_labelWithFont:fk_adjustFont(12) textColor:fkColor999999];
    [self.contentView addSubview:valueLabel];
    self.valueLabel = valueLabel;
    
    [nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(15);
        make.top.equalTo(self);
        make.right.equalTo(self).offset(-15);
        make.bottom.equalTo(self.mas_centerY);
    }];
    [valueLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.equalTo(nameLabel);
        make.bottom.equalTo(self);
        make.top.equalTo(nameLabel.mas_bottom);
    }];
}

- (void)setData:(id)data
{
    [super setData:data];
    
    self.nameLabel.text = data[@"name"];
    self.valueLabel.text = data[@"value"];
}


@end
